﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Agents.Admin
{
    public partial class StockOrderDetails : System.Web.UI.Page
    {
        /// <summary>
        /// Occurs when the page is loaded for the first time or being post back
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        /// <summary>
        /// Handele the page indexing
        /// </summary>
        /// <param name="source"></param>
        /// <param name="e"></param>
        protected void dgProducts_PageIndexChanged(object source, DataGridPageChangedEventArgs e)
        {
            // Updating the current page for the data grid to display.
            dgProducts.CurrentPageIndex = e.NewPageIndex;

            // Binding the data.
            dgProducts.DataBind();
        }

        /// <summary>
        /// Redirecting the admin back to his home page
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void backBtn_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/Admin/WaitingStockOrders.aspx");
        }
    }
}